//
//  NFSMoreRadioViewController.m
//  NeedForSpeed
//
//  Created by 王国强 on 15/10/20.
//  Copyright © 2015年 Avenger. All rights reserved.
//

#import "NFSMoreRadioViewController.h"

#import "NFSRadioView.h"

#import "BaseHeader.h"

#import "NFSRadioNextViewController.h"
@interface NFSMoreRadioViewController ()<NFSRadioDelegate>

@end

@implementation NFSMoreRadioViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setTitle:@"点播"];
    [self createCollectionView];

}
- (void)createCollectionView
{
//    UIScrollView *scrollew = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT )];
//    [scrollew setContentSize:CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT * 2)];
//    [scrollew setBounces:NO];
//    [self.view addSubview:scrollew];
    NFSRadioView *moreRadioView = [[NFSRadioView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT  ) address:@"http://app.api.autohome.com.cn/autov5.0.0/News/newsmyradiolist-pm1-tp0.json" type:@"0"];
    moreRadioView.NFSRadioDelegate =self;
    moreRadioView.userInteractionEnabled = YES;
    [moreRadioView.radioCollectionView setContentSize:CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT * 2)];
    [self.view addSubview: moreRadioView];
}
#pragma mark - 电台播放显示界面
- (void)createTabBar
{
    UIView *tabView =[[UIView alloc]initWithFrame:CGRectMake(0, SCREEN_HEIGHT - self.tabBarController.tabBar.frame.size.height, SCREEN_WIDTH, self.tabBarController.tabBar.frame.size.height)];
    [tabView setBackgroundColor:[UIColor blackColor]];
    [tabView setAlpha:0.8];
    [self.view addSubview:tabView];
}
- (void)pushNext:(NFSRadioModel *)model
{
    NFSRadioNextViewController *radioNext = [[NFSRadioNextViewController alloc]init];
    radioNext.adrress = [NSString stringWithFormat:@"http://app.api.autohome.com.cn/autov5.0.0/News/newsonewradiolist-pm1-aid%@-p1-s50-tp0.json",model.album_id];
    radioNext.imageurl = model.album_bigImgurl;
    radioNext.radioName = model.album_name;
    radioNext.album_descrition = model.album_descrition;

    [self.navigationController pushViewController:radioNext animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
